<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/DetailTemplate.master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="DotNetBurner" %>
<%@ Import Namespace="System.Web.Mvc" %>
<%@ Import Namespace="System.Web.Mvc.Html" %>
<%@ Import Namespace="Resources" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<div id="divSignup">
<div class="tab">
    <h1><%=Strings.SignUp%></h1>
</div>
<%using (Html.BeginForm("Signup", "User", FormMethod.Post, new { id = "signupform", onsubmit = "return signupSubmit(this)" }))
  { %>
    <%=Html.AntiForgeryToken("signup")%>
    <div>
        <p>
            <label for="userName" class="label"><%=Strings.UserName%>:</label>
            <%=Html.TextBox("userName", "", new { @class = "textBox" })%>
        </p>
        <p>
            <label for="password" class="label"><%=Strings.Password%>:</label>
            <%=Html.Password("password", "", new { @class = "textBox" })%>
        </p>
        <p>
            <label for="passwordConfirm" class="label"><%=Strings.Retype%>:</label>
            <%=Html.Password("passwordConfirm", "", new { @class = "textBox" })%>
        </p>
        <p>
            <label class="label"></label>
            <%=Strings.PasswordHashed%>
        </p>
        <p>
            <label for="email" class="label"><%=Strings.Email%>:</label>
            <%=Html.TextBox("email", "", new { @class = "textBox" })%>
        </p>
        <p>
            <label class="label"></label>
            <%=Strings.MailNotPublished%>
        </p>
        <div style="margin-left: 100px">
            <%=Html.GenerateCaptcha()%>        
        </div>
        <div id="signupErrors" class="errors"></div>
        <p>
            <label class="label"></label>
            <input id="btnSignup" type="submit" value="<%=Strings.SignUp%>" />
            <input type="reset" value="<%=Strings.Clear%>" id = "btnReset" />
        </p>
    </div>
<%} %>
</div>
    
<script type="text/javascript">
    function submitSucessCallback(res) {
        window.open('<%=Url.RouteUrl("Index")%>', '_self');
    }
    
    function signupSubmit(form) {

        formSubmit(form, '#signupErrors', '', '#btnSignup', submitSucessCallback, '', '');

        return false;
    }
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">
</asp:Content>
